package com.material.vtool.service;

import com.material.vtool.entity.BUserMaterialTypeEntity;
import com.material.vtool.entity.combinedEntity.HomePageMaterialTypeEntity;
import com.material.vtool.entity.combinedEntity.SimplyMaterialTypeEntity;

import java.util.List;

public interface UserMaterialTypeService {
    List<HomePageMaterialTypeEntity> getHomePageMaterialTypeList(Integer userId, String miniCode);

    List<SimplyMaterialTypeEntity> getUserMaterialType(Integer userId, String miniCode);

    List<SimplyMaterialTypeEntity> getHotMaterialType(Integer userId, String miniCode);

    /**
     * 初始化用户的频道信息,
     * @param userId 用户ID
     * @param miniCode 小程序标识
     * @return
     */
    int initializeUserMaterialType(Integer userId, String miniCode);

    int getUserMaterialTypeMinSort(Integer userId, String miniCode);

    BUserMaterialTypeEntity getUserMaterialTypeByMaterialTypeId(Integer userId, Integer materialTypeId);

    int updateUserMaterialType(BUserMaterialTypeEntity entity);

    int addUserMaterialType(BUserMaterialTypeEntity entity);

    int deleteUserMaterialType(Integer materialTypeId);

    int resortUserMaterialType(BUserMaterialTypeEntity entity);

    int saveUserMaterialType(Integer userId, List<SimplyMaterialTypeEntity> list);

    int saveUserMaterialTypeArray(Integer userId, Integer[] materialTypeIds);

    /**
     * 获取用户订阅频道 ID 列表
     * @param userId 用户 ID
     * @param miniCode 小程序标识码
     * @return
     */
    List<Integer> getUserMaterialTypeIdList(Integer userId, String miniCode);
}
